import { defineComponent } from "vue";
import styles from "./StatusTag.module.less";

export default defineComponent({
  props: {
    text: {
      type: String,
      required: true,
    },
    color: {
      type: String,
      default: "",
    }
  },
  setup(props) {
    return () => (
      <span class={[styles.StatusTag, props.text.toString() === '1' && styles.danger]}>
        {props.text.toString() === '0' ? "正常" : "停用"}
      </span>
    )
  }
})